package com.driver.fordriver.application;

import android.app.Application;

import com.baidu.mapapi.SDKInitializer;
import com.driver.fordriver.handler.MyHandler;
import com.driver.fordriver.manager.BaiduLocationManager;
import com.driver.fordriver.util.MyIndicatorAttr;
import com.driver.fordriver.util.attr.TextViewDrawableAttr;
import com.mob.MobApplication;
import com.mob.MobSDK;

import org.xutils.x;

import cn.smssdk.SMSSDK;
import solid.ren.skinlibrary.SkinConfig;
import solid.ren.skinlibrary.base.SkinBaseApplication;

/**
 * Created by XuYeWen on 2017/4/26.
 */

public class MyApplication extends SkinBaseApplication {
    private BaiduLocationManager manager;
    private  double latitude ;    //获取纬度信息
    private double longitude ;    //获取经度信息
    private float radius ;    //获取定位精度，默认值为0.0f
    @Override
    public void onCreate() {
        super.onCreate();
        x.Ext.init(this);//Xutils初始化
//        MobSDK.init(this,"16476b4619037","a81e5bdd171075b32a07aa0679dedd38");
//        SMSSDK.initSDK(this, "16476b4619037", "a81e5bdd171075b32a07aa0679dedd38");//短信注册sdk
        SDKInitializer.initialize(getApplicationContext());
        manager= BaiduLocationManager.getInstance(getApplicationContext());
        SkinConfig.addSupportAttr("myIndicatorAttr", new MyIndicatorAttr());
        SkinConfig.addSupportAttr("drawableTop", new TextViewDrawableAttr());
//        manager.onCreate();
    }

    public double getLatitude() {
        return manager.getLatitude();
    }

    public double getLongitude() {
        return manager.getLongitude();
    }

    public float getRadius() {
        return manager.getRadius();
    }

}
